<!DOCTYPE html>
<html>

<head>
	<meta charset='utf-8' />
	<title>GameCreator</title>
	<meta name='viewport'
		content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' />
	<meta name='apple-mobile-web-app-capable' content='yes' />
	<meta name='full-screen' content='true' />
	<meta name='screen-orientation' content='portrait' />
	<meta name='x5-fullscreen' content='true' />
	<meta name='360-fullscreen' content='true' />
	<meta http-equiv='Cache-Control' content='max-age=0' />
</head>
<div id="errorMsgDiv" style="color:#FFFFFF;z-index: 9999999;position: absolute;font-size:13px;"></div>

<body style="margin: 0px;background-color: #000;">

</body>

</html>
<script>
	// debugStart
	/**
	 * 抓取错误
	 */
	function catchError(type, errorMessage, scriptURI, lineNumber, columnNumber, errorObj) {
		scriptURI = scriptURI.replace(/\?r=\d*/g, "");
		var urlRoot = window.location.href.split("/");
		urlRoot.pop();
		urlRoot.pop();
		urlRoot.pop();
		var uriRoot = urlRoot.join("/");
		errorMsgDiv.innerHTML += " canvas builder -> " + decodeURIComponent(scriptURI.replace(uriRoot, "")) + " at " + lineNumber + "：" + errorMessage + "<br>";
	}
	window.addEventListener("keydown", function (e) {
		if (e.keyCode == 27) {
			if (top.top != window) {
				if (parent == top.top) { typeof cancelFullScreen == "function" && cancelFullScreen(); }
				else { parent.cancelFullScreen && parent.cancelFullScreen(); }
			}
		}
	}, true);
	// debugEnd
	window.isReportToGC = null;
	window.gcUrlParams = null;
	var paramStr = window.location.href.split("?").pop();
	if (paramStr.indexOf("gcDebugPort") == 0) {
		var paramArr = paramStr.split("&");
		var paramObj = {};
		for (var i = 0; i < paramArr.length; i++) {
			var onParamStr = paramArr[i].split("=");
			var paramName = onParamStr.shift();
			var paramValue = onParamStr.join("=");
			paramObj[paramName] = paramValue;
		}
		window.isReportToGC = true;
		window.gcUrlParams = paramObj;
		var xhr = new XMLHttpRequest();
		var debugPort = parseInt(window.gcUrlParams["gcDebugPort"]);
		var url = "http://127.0.0.1:" + debugPort + "/kdsrpg_http_indieapp.js?cmd=1";
		xhr.open("GET", url, true);
		xhr.send();
	}
	else {
		window.isReportToGC = false;
	}
	var em1 = /.*? \((http|file)\:.*?:\d+:\d+\)/g;
	var em2 = /^(http|file)\:.*?:\d+:\d+/g;
	window.onerror = function (errorMessage, scriptURI, lineNumber, columnNumber, errorObj) {
		// check report to gc
		if (parent.catchError || window.isReportToGC) {
			if (window.isReportToGC) reportToGC_Content("kdsrpgConsoleError", errorMessage, scriptURI, lineNumber, columnNumber, window.gcUrlParams["gcAppID"]);
			else if (parent.catchError) parent.catchError("kdsrpgConsoleError", errorMessage, scriptURI, lineNumber, columnNumber, errorObj);
			if (!errorObj || !errorObj.stack) return;
			var stackArr = errorObj.stack.split("\n    at ");
			stackArr.shift();
			stackArr.shift();
			// stackArr.pop();
			for (var i in stackArr) {
				var stackStr = stackArr[i];
				var m = stackStr.match(em1);
				if (m) {
					var fileNameArr = m[0].split(" ");
					var uriIdx = fileNameArr.length - 1;
					var fileNameIdx = fileNameArr.length - 2;
					var fileName = fileNameArr[fileNameIdx];
					var scriptURI = fileNameArr[uriIdx].split(".js")[0].substr(1) + ".js";
					var lineArr = fileNameArr[uriIdx].split(":");
					var lineNumber = parseInt(lineArr[lineArr.length - 2]);
					var columnNumber = parseInt(lineArr[lineArr.length - 1]);
				}
				else {
					m = stackStr.match(em2);
					if (m) {
						var lineStr = m[0];
						var scriptURI = lineStr.split(".js")[0] + ".js";
						var lineArr = lineStr.split(":");
						var lineNumber = parseInt(lineArr[lineArr.length - 2]);
						var columnNumber = parseInt(lineArr[lineArr.length - 1]);
					}
					else {
						continue;
					}
				}
				if (window.isReportToGC) reportToGC_Content("kdsrpgConsoleError", "调用堆栈 at " + fileName, scriptURI, lineNumber, columnNumber, window.gcUrlParams["gcAppID"]);
				else if (parent.catchError) parent.catchError("kdsrpgConsoleError", "调用堆栈 at " + fileName, scriptURI, lineNumber, columnNumber, errorObj);
			}
		}
	};
	function reportToGC_Content(mode, errMsg, fullURL, line, column, gcAppID) {
		var xhr = new XMLHttpRequest();
		var debugPort = parseInt(window.gcUrlParams["gcDebugPort"]);
		var url = "http://127.0.0.1:" + debugPort + "/kdsrpg_http_indieapp.js?cmd=0&mode=" + mode + "&errMsg=" + errMsg + "&fullURL=" + fullURL + "&line=" + line + "&column=" + column + "&gcAppID=" + gcAppID;
		xhr.open("GET", url, true);
		xhr.send();
	}
	var _log = console.log;
	console.log = function () {
		if (parent != window && !window.isReportToGC) {
			parent.console.log.apply(this, arguments);
		}
		else if (window.isReportToGC) {
			_log.apply(this, arguments);
			var traceContent = "";
			for (var i in arguments) {
				traceContent += arguments[i] + " ";
			}
			var xhr = new XMLHttpRequest();
			var debugPort = parseInt(window.gcUrlParams["gcDebugPort"]);
			var url = "http://127.0.0.1:" + debugPort + "/kdsrpg_http_indieapp.js?cmd=2&gcAppID=" + window.gcUrlParams["gcAppID"] + "&traceContent=" + encodeURIComponent(traceContent);
			xhr.open("GET", url, true);
			xhr.send();
			reportToGC_Content(this.arguments);
		}
		else {
			_log.apply(this, arguments);
		}
	};
	var __extends = (this && this.__extends) || function (d, b) {
		for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
		function __() { this.constructor = d; }
		d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
	};
	if (top.top.stopDragItem) {
		top.top.stopDragItem(document);
	}
</script>
<script type="text/javascript" src="GameCreatorLib/gamecreator.js" ></script>
<script type="text/javascript" src="Game/../out/system/CustomCommandParams.js" ></script>
<script type="text/javascript" src="Game/../out/system/CustomConditionParams.js" ></script>
<script type="text/javascript" src="Game/../out/system/CustomGameNumberParams.js" ></script>
<script type="text/javascript" src="Game/../out/system/CustomModuleRuntime.js" ></script>
<script type="text/javascript" src="Game/../out/system/GameAttributeRuntime.js" ></script>
<script type="text/javascript" src="Game/../out/system/MaterialRuntime.js" ></script>
<script type="text/javascript" src="Game/../out/GCMain.js" ></script>
<script type="text/javascript" src="Game/../out/system/SceneObjectModels.js" ></script>
<script type="text/javascript" src="Game/../out/system/SceneObjectModules.js" ></script>
<script type="text/javascript" src="Game/../out/system/UIRuntime.js" ></script>
<script type="text/javascript" src="Game/../out/MyGame/GUI_CupGroup_W26.js" ></script>
<script type="text/javascript" src="Game/../out/MyGame/GUI_EyesightGamePlay_W26.js" ></script>
<script type="text/javascript" src="Game/../out/MyGame/Sprite_Cup_W26.js" ></script>
<script type="text/javascript" src="Game/../out/MyGame/Start.js" ></script><script>
               var runParamsArr = window.location.href.split("?").pop().split("runParams=");
               var runParams;
               if(runParamsArr.length==2){
                  runParams = decodeURIComponent(runParamsArr[1]).split("[,]");
               }
               if(typeof main !='undefined'){runParams?main.apply(null,runParams):main();}else{console.trace('没有找到main函数!');}
               </script>